package com.he.projects.custom.service;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.he.projects.custom.dao.BackuserDao;
import com.he.projects.custom.entity.Backuser;
import com.he.projects.custom.entity.Menu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

/**
 * @author heyanjing
 * date:2020-07-13 2020/7/13:22:29
 */
@Service
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 500, rollbackFor = {Exception.class, RuntimeException.class})
public class UserService {

    @Autowired
    private BackuserDao backuserDao;

    public void insert(Menu menu) {
        menu.setMenuId(IdUtil.simpleUUID());
        menu.setCreateDate(new Date());
        menu.setStatus("");

    }

}
